///*
// * chunk.h
// *
// *  Created on: Apr 29, 2011
// *      Author: redchen
// */
//
//#ifndef CHUNK_H_
//#define CHUNK_H_
//
//#ifdef __cplusplus
//extern "C"
//{
//#endif
//
//#include <lfs.h>
//#include <list.h>
//#include <file.h>
//
//typedef struct _Chunk_ Chunk;
//
//#define CHUNK_PREFIX "c."
//
///**
// * Filename include real filename and input file path,'myfolder/1.txt'.
// * Path is real path which from system.'data'
// */
//Chunk* chunk_init(const char* path, int64_t id, char* filename, int32_t size);
//
//Chunk* chunk_create(const char* path, int64_t id, char* filename, int32_t size);
//
//Chunk* chunk_load(const char* path, int64_t id);
//
//Chunk* chunk_load_by_name_space(const char* path, char* chunk_name);
//
//int chunk_match(void* chunk1, void* chunk2);
//
//Chunk* chunk_get_by_id(List* chunk_list, int64_t id);
//
///**
// * Append file to the tail of chunk,and flush it.
// * if full,append failed return 'false',else return 'true'
// */
//boolean chunk_append(Chunk* chunk, SFile* file);
//
//int32_t chunk_get_free_size(Chunk* chunk);
//
//int32_t chunk_get_extra_index_size(int32_t times);
//
////get info
//
////get data
//
//int64_t chunk_get_latest_timestamp(Chunk* chunk);
//
//Status chunk_get_sfile_by_timestamp(Chunk* chunk, int64_t timestamp,/*out*/SFile* sfile);
//
///**
// * return List<SFile>
// */
//Status chunk_get_sfiles_by_timestamp_start(Chunk* chunk, int64_t start,/*out*/List* sfiles);
//
///**
// * return List<SFile>
// */
//Status chunk_get_sfiles_by_timestamp_start_end(Chunk* chunk, int64_t start, int64_t end,/*out*/List* sfiles);
//
///**
// * @param    List<Chunk> chunk_list
// * @return    List<SFileInfo>
// */
//List* chunk_get_all_sfiles_info_by_filename(List* chunk_list, char* filename, int64_t id);
//
////get method
//
//char* chunk_get_filename(Chunk* chunk);
//
//int64_t chunk_get_id(Chunk* chunk);
///**
// *
// */
//void* chunk_destroy(Chunk* chunk);
//
//void chunk_free(void* target);
//
//void chunk_index_free(void* target);
//
//void chunk_fill_full(Chunk* chunk);
//
////
//
//void chunk_show_trailer(Chunk* chunk);
//
//void chunk_show_data(Chunk* chunk);
//
///**
// * _chunk_status{
// *     SERVICE,
// *    DELETED
// *  };
// */
//void chunk_set_status(Chunk* chunk, int32_t status);
//
///**
// * _chunk_status{
// *     SERVICE,
// *    DELETED
// *  };
// */
//int32_t chunk_get_status(Chunk* chunk);
//
//Status chunk_delete(Chunk* chunk, boolean is_instant);
//
//Status chunk_get_all_data(Chunk* chunk, /*out*/Buffer* buf);
//
//Status chunk_set_all_data(const char* path, int64_t id, void* data, int32_t size);
//
//#ifdef __cplusplus
//}
//#endif
//
//#endif /* CHUNK_H_ */
